package com.wn.ticket.security;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @创建人 NST
 * @创建时间 2022/8/18
 * @描述
 */
@Getter
@Setter
@ToString
public class FrontUser extends User{
    private Integer id;
    private Collection<? extends GrantedAuthority> authority;

    public FrontUser(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public FrontUser(int id, String username, String password, Collection<? extends GrantedAuthority> authorities) {
        this(username, password, authorities);
        this.id=id;
        this.authority=authorities;
    }

}
